<?php
include_once('model/M_Startup.php');

function __autoload($className)
{
	include_once('controller/'.$className.'.php');
}
// инициализация
startup();

// выбор контроллера 
switch ($_GET['c'])
{
	case 'login':
	$controller = new C_Login();
	break;
	case 'search':
	$controller = new C_Search();
	break;
	case 'mail_post':
	$controller = new C_Mail_Post();
	break;
	case 'articl_hard':
	$controller = new C_Article_Hard();
	break;
	case 'articl_review':
	$controller = new C_Article_Review();
	break;
	case 'contacts':
	$controller = new C_Contact();
	break;
	case 'reg':
	$controller = new C_Registration();
	break;
	case 'del':
	$controller = new C_Article_Del();
	break;
	case 'insert':
	$controller = new C_Insert();
	break;
	case 'first':
	$controller = new C_First();
	break;	
	case 'articl':
	$controller = new C_Article();
	break;
	case 'once':
	$controller = new C_Article_Once();
	break;
	case 'add':
	$controller = new C_Article_Add();
	break;	
	case 'edit':
	$controller = new C_Article_Edit();
	break;
	default:
	$controller = new C_First();
}

// обработка запроса
$controller->Request();